package com.mqy.spring.service;

import com.mqy.spring.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author 13159 //作者
 * @version V1.0 //版本
 * @Project 2022.3.3springRM
 * @Package com.mqy.spring.service
 * @Description:
 * @Date 2022/3/3 16:25//日期
 * @Motto:放下杂念,只为迎接明天更好的自己
 */
@Component
public class UserService {
    @Autowired
    private UserDao userDao = new UserDao();

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public void show() {
        System.out.println("UserService中的方法show执行了");
        userDao.addUser();
    }
}
